<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <link rel="icon" href="images/index.ico">
    <title>主页</title>
    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
    <link href="css/carousel.css" rel="stylesheet">
    <link href="css/home.css" rel="stylesheet">
    <script src="bower_components/angular/angular.js"></script>
    <script src="bower_components/jquery/dist/jquery.js"></script>
    <script src="js/holder.min.js"></script>
    <script src="js/session.js"></script>
    <script src="js/home.js"></script>
    <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>


</head>

<body ng-app="recommendApp"  ng-controller="userCtrl">
<!-- Fixed navbar -->
<nav class="navbar navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                    aria-expanded="false" aria-controls="navbar"><span class="sr-only">Toggle navigation</span> <span
                    class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span></button>
            <a class="navbar-brand logo" href="home.html"><img id="logo" src="images/logo.png" alt=""/></a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li ng-show="hasLogin">
                    <a href="userInfo.html">Welcome {{userAccount}}</a>
                </li>
                <li ng-hide="hasLogin"><a href="login.html"><span class="glyphicon glyphicon-user"></span> 登录</a></li>
                <li ng-hide="hasLogin"><a href="register.html"><span class="glyphicon glyphicon-inbox"></span> 注册</a></li>
                <li><a href="home.html"><span class="glyphicon glyphicon-home"></span> 主页</a></li>
                <li ng-show="hasLogin"><a href="order.html"><span class="glyphicon glyphicon-th-list"></span> 我的订单</a></li>
                <li ng-show="hasLogin"><a ng-click="logOut()"><span class="glyphicon glyphicon-log-out"></span> 退出</a></li>
            </ul>
        </div>
        <!--/.nav-collapse -->
    </div>
</nav>
<!-- Carousel
================================================== -->

<div class="container" ng-app="recommendApp" ng-controller="RecommendController">
    <div id="myCarousel" class="carousel slide" data-ride="carousel">
        <!-- Indicators -->
        <ol class="carousel-indicators">
            <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
            <li data-target="#myCarousel" data-slide-to="1"></li>
            <li data-target="#myCarousel" data-slide-to="2"></li>
        </ol>
        <div class="carousel-inner" role="listbox">
            <div class="item active"> <img class="first-slide" src="{{dishes[0].dicon}}" alt="First slide">
                <div class="container">
                    <div class="carousel-caption">
                        <a href="CHa/dishes?mid={{dishes[0].merchant}}">进入商家</a>
                    </div>
                </div>
            </div>
            <div class="item"> <img class="second-slide" src="{{dishes[1].dicon}}" alt="Second slide">
                <div class="container">
                    <div class="carousel-caption">
                        <a href="CHa/dishes?mid={{dishes[1].merchant}}">进入商家</a>
                    </div>
                </div>
            </div>
            <div class="item"> <img class="third-slide" src="{{dishes[2].dicon}}" alt="Third slide">
                <div class="container">
                    <div class="carousel-caption">
                        <a href="CHa/dishes?mid={{dishes[2].merchant}}">进入商家</a>
                    </div>
                </div>
            </div>
        </div>
        <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a>
        <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only">Next</span> </a>
    </div>
    <!-- /.carousel -->
</div>


<!-- Marketing messaging and featurettes
================================================== -->
<div ng-controller="MerchantController">
    <div class="container">
        <div class="col-md-3 shop"  ng-repeat="item in merchants">
            <a href="CHa/dishes?mid={{item._id}}">
                <img class="icon" src="{{item.icon}}">
            </a>
            <h4>{{item.shopName}}</h4>
            <span>评分：
                <img src="images/fullStar.gif" ng-repeat="s in item.starlist">
            </span>
            <span class="order">月售{{item.orderNumber}}单</span>
            <p>地址 ：{{item.address}}</p>
        </div>
    </div>
</div>
<!-- /merchantList -->
<!-- ================================================== -->

<!-- Wrap the rest of the page in another container to center all the content. -->
<div class="container" id="merchantList"></div>
<!-- /.container -->
<hr class="featurette-divider">
<div class="container">
    <!-- FOOTER -->
    <footer>
        <p>&copy; 2016 北极熊 Company, Inc.</p>
    </footer>
</div>

<!--  顶部书签链接 -->
<div class="top_pointer">
    <a href="#top">
        <img src="images/top_pointer.png">
    </a>
</div>
</body>

</html>